package com.day11.duotai;

public class AnimalDemo1 {
public static void main(String[] args) {
//创建猫类对象进行测试
    Animal1 a = new Animal1();
    a.setName("加菲");
    a.setAge(5);
    System.out.println(a.getName() + "," + a.getAge());
    a.eat();
    a = new Animal1("加菲", 5);
    System.out.println(a.getName() + "," + a.getAge());
    a.eat();
}
}
